const {uploadFiles,moveFiles,deleteFiles}=require('../utils/handleFile')
const ResponseEntity=require('../utils/ResponseEntity')
class FileUploadController{
    getFile(req,res){
        const uploadImages=uploadFiles()
   
        uploadImages(req,res,(error)=>{
            if (error) {
                res.send(ResponseEntity.error({message:'上传失败'}))
            }else{
                console.log('上传成功');
                console.log(req.files);
                res.send(ResponseEntity.success({data:req.files[0].filename}))
            }
        })
    }
  
}
module.exports=new FileUploadController()